export default class Queue {
    private items: any[] = [];
    // 将元素入队列
    public enqueue(item: any): void {
        this.items.push(item);
    }
    // 出队列
    public dequeue(): any {
        return this.items.shift();
    }
    // 查看队列排在最前面的元素
    public front(): any {
        return this.items[0];
    }
    // 判断队列是否为空
    public isEmpty(): any {
        return !this.items.length;
    }
    // 队列中元素的个数
    public size(): number {
        return this.items.length;
    }
    // toString 12 235 25
    public toString(): string {
        return this.items.join(" ");
    }
}
